home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / validation / ValidatorError.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  1.9 KB  |  98 lines

  1. package com.extensibility.validation;
  2.  
  3. import org.w3c.dom.Attr;
  4. import org.w3c.dom.CharacterData;
  5. import org.w3c.dom.Element;
  6. import org.w3c.dom.Node;
  7. import org.w3c.dom.ProcessingInstruction;
  8.  
  9. public final class ValidatorError {
  10.    protected Object errorLocation;
  11.    protected Node offendingNode;
  12.    protected Node ownerNode;
  13.    protected String message;
  14.    protected int errorColumn;
  15.  
  16.    public ValidatorError() {
  17.    }
  18.  
  19.    public ValidatorError(Element var1, Node var2, String var3) {
  20.       this.errorLocation = var1;
  21.       this.offendingNode = var2;
  22.       this.message = var3;
  23.    }
  24.  
  25.    public ValidatorError(Attr var1, Node var2, String var3) {
  26.       this.errorLocation = var1;
  27.       this.ownerNode = var2;
  28.       this.message = var3;
  29.    }
  30.  
  31.    public ValidatorError(CharacterData var1, String var2) {
  32.       this.errorLocation = var1;
  33.       this.message = var2;
  34.    }
  35.  
  36.    public ValidatorError(ProcessingInstruction var1, String var2) {
  37.       this.errorLocation = var1;
  38.       this.message = var2;
  39.    }
  40.  
  41.    public ValidatorError(int var1, int var2, String var3) {
  42.       this.errorLocation = new Integer(var1);
  43.       this.errorColumn = var2;
  44.       this.message = var3;
  45.    }
  46.  
  47.    public ValidatorError(String var1) {
  48.       this.errorLocation = new Integer(0);
  49.       this.errorColumn = 0;
  50.       this.message = var1;
  51.    }
  52.  
  53.    public Object getErrorLocation() {
  54.       return this.errorLocation;
  55.    }
  56.  
  57.    public int getErrorLine() {
  58.       byte var1 = 0;
  59.  
  60.       try {
  61.          int var2 = (Integer)this.errorLocation;
  62.          return var2;
  63.       } catch (ClassCastException var4) {
  64.          return var1;
  65.       }
  66.    }
  67.  
  68.    public int getErrorColumn() {
  69.       return this.errorColumn;
  70.    }
  71.  
  72.    public Node getErrorNode() {
  73.       try {
  74.          Node var1 = (Node)this.errorLocation;
  75.          return var1;
  76.       } catch (ClassCastException var3) {
  77.          Object var2 = null;
  78.          return (Node)var2;
  79.       }
  80.    }
  81.  
  82.    public Node getOffendingNode() {
  83.       return this.offendingNode;
  84.    }
  85.  
  86.    public Node getOwnerNode() {
  87.       return this.ownerNode;
  88.    }
  89.  
  90.    public String getMessage() {
  91.       return this.message;
  92.    }
  93.  
  94.    public String toString() {
  95.       return this.message;
  96.    }
  97. }
  98.